import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.SynchronousQueue;

public class BlockQueueDemo {
    public static void main(String[] args) {
        BlockingQueue<String> queue = new ArrayBlockingQueue<>(3);

        System.out.println(queue.add("A"));
        System.out.println(queue.add("A"));
        System.out.println(queue.add("A"));

        System.out.println(queue.add("B"));

        SynchronousQueue<String> synchronousQueue = new SynchronousQueue<>();
    }
}
